-------- config.lua --------
-- Config file for OTServ --
----------------------------

-- data directory location
datadir = "data/"

-- map location
map = "data/world/map.otbm"

-- Type of map storage,
-- 'relational' - Slower, but possible to run database queries to change all items to another id for example.
-- 'binary' - Faster, but you cannot run DB queries.
-- To switch, load server with the current type, change the type in config.lua
-- type /reload config and the save the server with /closeserver serversave
map_store_type = "binary"

-- mapkind
-- options: OTBM for binary map, XML for OTX map
mapkind = "OTBM"

-- server name
servername = "OTServ"

-- server location
location = "Germany"

-- server ip (the ip that server listens on)
ip = "127.0.0.1"

-- login server port
-- This should be the port used for connecting with IP changers etc.
login_port = "7171"

-- game server port
-- game server must be on it's own port (due to limits of the protocol)
game_port = "7172"

-- status port
-- Used by status protocol connections, should be same as login
-- to work correctly with server lists etc.
status_port = "7171"

-- admin port
-- Port used by the OTAdmin protocol
admin_port = "7171"

-- server url
url = "http://otfans.net"

-- server owner name
ownername = "Tliff"

-- server owner email
owneremail = "otserv@tibia.de"

-- world name
worldname = "OpenTibia"

-- world type
-- options: pvp, no-pvp, pvp-enforced
worldtype = "pvp"

-- does player rate (from lua functions) count on experience gained from killings players on pvp-e worlds?
rates_for_player_killing = false

-- exhausted time in ms (1000 = 1 second) for "yell" speak type
exhausted = 1000

-- exhausted time in ms (1000 = 1 second) for aggressive spells/weapons
fightexhausted = 2000

-- exhausted time in ms (1000 = 1 second) for none-aggressive spells
healexhausted = 1000

-- exhausted time in ms (1000 = 1 second) for floor changing
stairhop_exhausted = 2000

-- attack speed using melee (1000 = 1 second)
attackspeed = 2000

-- how many ms to add if the player is already exhausted and tries to cast a spell/yells (1000 = 1 second)
exhaustedadd = 200

-- how long does the player has to stay out of fight to get pz unlocked in ms (1000 = 1 second)
in_fight_duration = 60000

-- how long a field belongs to a player before it no longer causes PZ lock for the owner
field_ownership_duration = 5000

-- When a player dies, how many of the assisting players (ie. how many of those who made damage) should be stored in database?
death_assist_count = 19

-- enable (advanced, item based) hotkeys?
enablehotkeys = true

-- minimum amount of time between actions ('Use') (1000 = 1 second)
minactioninterval = 200

-- minimum amount of time between extended actions ('Use with...') (1000 = 1 second)
minactionexinterval = 1000

-- house rent period
-- options: daily, weekly, monthly
houserentperiod = "monthly"

-- whether or not to check for premium accounts when using beds
premonlybeds = true

-- Should the server use account balance system or depot system for paying houses?
useaccbalance = true

-- How long time the red skull will last in seconds (default 30 days)
red_skull_duration = 30*24*60*60

-- How long time the black skull will last in seconds (default 45 days)
black_skull_duration = 45*24*60*60

-- White skull duration, how long a player will get pz locked/white skull
unjust_skull_duration = 15*60*1000

-- Enable this and players will get pzlocked regardless of being the aggressor or not (<8.5 this was set to true)
defensive_pz_lock = false

-- How many players you need to kill to gain a red skull per day/week/month
-- Set 0 to disable
kills_per_day_red_skull = 3
kills_per_week_red_skull = 5
kills_per_month_red_skull = 10

-- How many players you need to kill to gain a black skull per day/week/month
-- Set 0 to disable
kills_per_day_black_skull = 6
kills_per_week_black_skull = 10
kills_per_month_black_skull = 20

-- Broadcast violation window banishments
broadcast_banishments = "no"

-- Violation window config
max_violation_comment_size = 255
notations_to_banishment = 3
warnings_to_final_banishment = 4
warnings_to_deletion = 5
banishment_length = 7*86400 --seconds
final_banishment_length = 30*86400 --seconds
ip_banishment_length = 86400 --seconds

-- Extra experience % per player when sharing experience
party_exp_mul = 5

-- Anti-MageBomb system
-- This system works as in Tibia, time in milliseconds
login_attack_delay = 10*1000

-- Show error window when server crashes?
show_crash_window = true

-- AFK Configuration (in milliseconds, but use values for minutes)
-- Maximum time a player can stay away from keyboard before being kicked
max_idle_time = 16*60*1000
-- Player will be warned about being kicked at this time
max_idle_time_warning = 15*60*1000

-- Should just premium players be able to use addons?
addons_only_for_premium = true

-- rates (experience, skill, magic level, loot and spawn)
rate_exp = 1
rate_exp_pvp = 1
rate_skill = 1
rate_mag = 1
rate_loot = 1
rate_spawn = 1

-- Stamina Configuration
-- Gain stamina rate - 1 second offline = X milliseconds of stamina
rate_stamina_gain = 334
-- Slow gain stamina rate. This is used if you are gaining stamina that gives extra experience
-- 1 second offline = X milliseconds of stamina
slow_rate_stamina_gain = 84
-- Loss stamina rate - works as other rates
rate_stamina_loss = 1
-- For how many milliseconds (from 42 hours) you get extra experience from monsters
stamina_extra_experience_duration = 60 * 60 * 1000
-- How much extra XP you get 0.5 is 50% extra
stamina_extra_experience_rate = 0.5
-- If true, only premium players gain extra experience
stamina_extra_experience_onlyprem = true
-- For how many milliseconds after killing a monster stamina will keep being removed
hunting_kill_duration = pzlocked

-- Remove ammunition
-- If false, ammunition will not be removed when using distance weapons
-- (or other weapons that use ammunition)
remove_ammunition = true

-- Remove rune charges
-- This only applies to runes done using the default functions.
-- Custom runes made using actions will not be affected.
remove_rune_charges = true

-- Remove weapon charges
-- Set to false to disable charges disappearing from weapons on use
remove_weapon_charges = true

-- Distance weapon configuration
-- Should exhaustion and action time be checked for using a distance weapon?
distance_weapon_interrupt_swing = true

-- Allow gamemaster multiclient login to everybody?
allow_gamemaster_multiclient = false

-- despawn configs
-- how many floors can a monster go from his spawn before despawning
despawnrange = 2
-- how many square metters can a monster be far from his spawn before despawning
despawnradius = 50

-- max number of messages a player can say before getting muted (default 4), set to 0 to disable muting
maxmessagebuffer = 4

-- max amount of none stackable items that a NPC will sell to a player at the same time
npc_max_nonestackable_sell_amount = 100

-- motd (the message box that you sometimes get before you choose characters)
motd = "Welcome to OTServ 0.6.3!"
motdnum = "1"

-- login message
loginmsg = "Welcome to OTServ 0.6.3. For help visit http://otfans.net."

-- how many logins attempts until ip is temporary disabled
-- set to 0 to disable
logintries = 5

-- how long the retry timeout until a new login can be made (without disabling the ip)
retrytimeout = 5000

-- how long the player need to wait until the ip is allowed again
logintimeout = 60 * 1000

-- allow clones (multiple logins of the same char)
allowclones = false

-- only one player online per account
checkaccounts = true

-- max number of players allowed
maxplayers = "900"

-- save client debug assertion reports
saveclientdebug = true

-- Set the max query interval for retrieving status information
-- default: 5 minutes / IP
-- set to 0 to disable
statustimeout = 30 * 1000

-- accounts password type
-- options: plain, md5, sha1
passwordtype = "plain"

-- Password salt
-- Offers better security against rainbow table attacks etc.
passwordsalt = ""

-- House configuration (game_class)
-- House tile price
house_tile_price = 100
-- Only premium players can buy houses?
house_only_premium = true
-- Level to buy houses
house_level = 1
-- Show house price and its rent price when looking at its door?
-- PS: This info is going to be shown just if house has no owner
show_house_prices = false

-- SQL type
-- options: mysql, sqlite, odbc or pgsql
sql_type = "sqlite"

--- SQL connection part
sql_db   = "db.s3db"
--- sql_db = "otserv" -- use this for MySQL/PgSQL
--- sql_db = "Your Source" -- ODBC

-- there settings are not used by SQLite
sql_host = "localhost"
sql_port = 3306
--- sql_port = 5432 -- use this for PgSQL
sql_user = "root"
sql_pass = ""
